import requests
from SelfStudy.FrameWork.ApiIhrmpytest.common.logger_util import get_logger

class RequestUtil:
    @staticmethod
    def send_post(url, data=None, headers=None):
        log=get_logger()
        try:
            response = requests.post(url, json=data, headers=headers)
            return response
        except requests.exceptions.RequestException as e:
            log.error(f"请求异常：{e}")
            raise